package com.sunni.controller;

import com.sunni.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@Controller
@RequestMapping("/converter")
public class ConverterHandle {

    @RequestMapping("/date")
    @ResponseBody
    public String getDate(Date date){
        return date.toString();
    }

    @RequestMapping("/user")
    @ResponseBody
    public User getUser(User user){
        return user;
    }
}
